import Vue from 'vue'
import Router from 'vue-router'
//一级路由
import Login from './views/Login'
import RootApp from './views/RootApp'
//二级路由
import HomePage from './views/HomePage'
import FocusDomain from './views/FocusDomain'
import AggregationFound from './views/AggregationFound'
import SilkRoadHot from './views/SilkRoadHot'
import SubjectAnalysis from './views/SubjectAnalysis'
import Earth3d from './components/HomePage/Earth3d'

Vue.use(Router)

export default new Router({
  routes: [
    { 
      path: '/', 
      redirect: { name: 'login' }
    },
    {
      path: '/rootApp',
      name: 'rootApp',
      component: RootApp,
      children:[
        {
          path: '/home',
          name: 'home',
          component: HomePage,
        },
        {
          path: '/focusDomain',
          name: 'focusDomain',
          component: FocusDomain
        },
        {
          path: '/silkRoadHot',
          name: 'silkRoadHot',
          component: SilkRoadHot
        },
        {
          path: '/aggregationFound',
          name: 'aggregationFound',
          component: AggregationFound
        },
        {
          path: '/subjectAnalysis',
          name: 'subjectAnalysis',
          component: SubjectAnalysis
        },
        {
          path: '/ljl/earth3d',
          name: 'earth3d',
          component: Earth3d
       }
      ]
    },
    {
      path: '/login',
      name: 'login',
      component: Login
    }
  ]
})

